<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: imuExample.cpp</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('imuExample_8cpp-example.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">imuExample.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<p>Example of gathering IMU data from SeekurSample program that demonstrates how to get IMU data from an IMU on a Seekur-class robot (from SeekurOS). Only some Seekurs have IMUs.</p>
<p>[Some Pioneers also have gyros that are integrated into the robot and normally automatically correct data or which can optionally return the data seperately (using different packets and different ARIA interface in <a class="el" href="classArAnalogGyro.html" title="Use onboard gyro to improve the heading in an ArRobot object&#39;s pose value. ">ArAnalogGyro</a>).]</p>
<p>The data comes back in a custom packet with ID 0x9A. It's requested with client command 26.</p>
<p>Press escape to exit the program.</p>
<div class="fragment"><div class="line"></div><div class="line"><span class="preprocessor">#include &quot;Aria.h&quot;</span></div><div class="line"><span class="preprocessor">#include &lt;time.h&gt;</span></div><div class="line"></div><div class="line"><span class="keywordtype">bool</span> imuPacketHandler(<a name="_a0"></a><a class="code" href="classArRobotPacket.html">ArRobotPacket</a>* packet) {</div><div class="line">  <span class="keywordflow">if</span> (packet-&gt;<a name="a1"></a><a class="code" href="classArRobotPacket.html#a0e41b0bbe73260cff302094500a51b7d">getID</a>() != 0x9a) {</div><div class="line">    <span class="comment">//ArLog::log(ArLog::Normal, &quot;ignoring packet with id: %d&quot;, packet-&gt;getID());</span></div><div class="line">    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line">  }</div><div class="line">  <span class="keywordtype">int</span> timeSince = packet-&gt;<a name="a2"></a><a class="code" href="classArBasePacket.html#a3006b1fbf239cea0013d0a9e0c0c1baf">bufToByte</a>();</div><div class="line">  <span class="keywordtype">int</span> numPerAxis = packet-&gt;<a class="code" href="classArBasePacket.html#a3006b1fbf239cea0013d0a9e0c0c1baf">bufToByte</a>();</div><div class="line"></div><div class="line">  <a name="a3"></a><a class="code" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a name="a4"></a><a class="code" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;got IMUpac, %dms since readings took place, %d readings per axis&quot;</span>, timeSince, numPerAxis);</div><div class="line">  <span class="keywordtype">int</span> i;</div><div class="line">  <span class="keywordtype">int</span> range;</div><div class="line">  <span class="keywordtype">double</span> x = 0.0;</div><div class="line">  <span class="keywordtype">double</span> y = 0.0;</div><div class="line">  <span class="keywordtype">double</span> z = 0.0;</div><div class="line">  <span class="keywordtype">double</span> multiplier = 0.0;</div><div class="line">  <span class="keywordtype">double</span> offset = 0.0;</div><div class="line">  <span class="keywordtype">int</span> numGyroAxes = packet-&gt;<a class="code" href="classArBasePacket.html#a3006b1fbf239cea0013d0a9e0c0c1baf">bufToByte</a>();</div><div class="line">  <span class="keywordflow">for</span> (i=1; i &lt;= numPerAxis; i++) {</div><div class="line">    x = 0.0;</div><div class="line">    y = 0.0;</div><div class="line">    z = 0.0;</div><div class="line">    range = packet-&gt;<a class="code" href="classArBasePacket.html#a3006b1fbf239cea0013d0a9e0c0c1baf">bufToByte</a>();</div><div class="line">    <span class="keywordflow">if</span> (range == 3) {</div><div class="line">      multiplier = 0.07326;</div><div class="line">      offset = 0.0;</div><div class="line">    }</div><div class="line">    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (range == 2) {</div><div class="line">      multiplier = 0.03663;</div><div class="line">      offset = 0.0;</div><div class="line">    }</div><div class="line">    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (range == 1) {</div><div class="line">      multiplier = 0.01832;</div><div class="line">      offset = 0.0;</div><div class="line">    }</div><div class="line">    <span class="keywordflow">if</span> (numGyroAxes &gt;= 1) {</div><div class="line">      x = (packet-&gt;<a name="a5"></a><a class="code" href="classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() * multiplier) + offset;</div><div class="line">    }</div><div class="line">    <span class="keywordflow">if</span> (numGyroAxes &gt;= 2) {</div><div class="line">      y = (packet-&gt;<a class="code" href="classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() * multiplier) + offset;</div><div class="line">    }</div><div class="line">    <span class="keywordflow">if</span> (numGyroAxes &gt;= 3) {</div><div class="line">      z = (packet-&gt;<a class="code" href="classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() * multiplier) + offset;</div><div class="line">    }</div><div class="line">    <a class="code" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="code" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;gyro:  reading %d of %d,       x: %10.4f deg/s,   y: %10.4f deg/s,   z: %10.4f deg/s&quot;</span>, </div><div class="line">           i, numPerAxis, x, y, z);</div><div class="line">  }</div><div class="line">  <span class="keywordtype">int</span> numAccelAxes = packet-&gt;<a class="code" href="classArBasePacket.html#a3006b1fbf239cea0013d0a9e0c0c1baf">bufToByte</a>();</div><div class="line">  <span class="keywordflow">for</span> (i=1; i &lt;= numPerAxis; i++) {</div><div class="line">    x = 0.0;</div><div class="line">    y = 0.0;</div><div class="line">    z = 0.0;</div><div class="line">    multiplier = 0.002522 * 9806.65;</div><div class="line">    offset = 0.0;</div><div class="line">    <span class="keywordflow">if</span> (numAccelAxes &gt;= 1) {</div><div class="line">      x = (packet-&gt;<a class="code" href="classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() * multiplier) + offset;</div><div class="line">    }</div><div class="line">    <span class="keywordflow">if</span> (numAccelAxes &gt;= 2) {</div><div class="line">      y = (packet-&gt;<a class="code" href="classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() * multiplier) + offset;</div><div class="line">    }</div><div class="line">    <span class="keywordflow">if</span> (numAccelAxes &gt;= 3) {</div><div class="line">      z = (packet-&gt;<a class="code" href="classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() * multiplier) + offset;</div><div class="line">    }</div><div class="line">    <a class="code" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="code" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;accel: reading %d of %d,       x: %10.4f mg,      y: %10.4f mg,      z: %10.4f mg&quot;</span>,</div><div class="line">           i, numPerAxis, x, y, z);</div><div class="line">  }</div><div class="line">  <span class="keywordtype">int</span> numTemperatureAxes = packet-&gt;<a class="code" href="classArBasePacket.html#a3006b1fbf239cea0013d0a9e0c0c1baf">bufToByte</a>();</div><div class="line">  <span class="keywordflow">for</span> (i=1; i &lt;= numPerAxis; i++) {</div><div class="line">    x = 0.0;</div><div class="line">    y = 0.0;</div><div class="line">    z = 0.0;</div><div class="line">    multiplier = 0.1453;</div><div class="line">    offset = 25.0;</div><div class="line">    <span class="keywordflow">if</span> (numTemperatureAxes &gt;= 1) {</div><div class="line">      x = (packet-&gt;<a class="code" href="classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() * multiplier) + offset;</div><div class="line">    }</div><div class="line">    <span class="keywordflow">if</span> (numTemperatureAxes &gt;= 2) {</div><div class="line">      y = (packet-&gt;<a class="code" href="classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() * multiplier) + offset;</div><div class="line">    }</div><div class="line">    <span class="keywordflow">if</span> (numTemperatureAxes &gt;= 3) {</div><div class="line">      z = (packet-&gt;<a class="code" href="classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() * multiplier) + offset;</div><div class="line">    }</div><div class="line">    <a class="code" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="code" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;temperature: reading %d of %d, x: %10.4f degC,    y: %10.4f degC,    z: %10.4f degC&quot;</span>,</div><div class="line">           i, numPerAxis, x, y, z);</div><div class="line">  }</div><div class="line">  <a class="code" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="code" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line">  <a class="code" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="code" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line"></div><div class="line">  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv) {</div><div class="line">  <a name="a6"></a><a class="code" href="classAria.html#ad99c16b5d947229d9f8e1c5b2d4cdd73">Aria::init</a>();</div><div class="line">  <a name="_a7"></a><a class="code" href="classArArgumentParser.html">ArArgumentParser</a> parser(&amp;argc, argv);</div><div class="line">  parser.<a name="a8"></a><a class="code" href="classArArgumentParser.html#a501694b62a7f8b0c3cadd84aeafe1b35">loadDefaultArguments</a>();</div><div class="line">  <a name="_a9"></a><a class="code" href="classArRobot.html">ArRobot</a> robot;</div><div class="line"></div><div class="line">  <a name="_a10"></a><a class="code" href="classArRobotConnector.html">ArRobotConnector</a> robotConnector(&amp;parser, &amp;robot);</div><div class="line">  <span class="keywordflow">if</span>(!robotConnector.<a name="a11"></a><a class="code" href="classArRobotConnector.html#ab192ac393d9cc1e5b61b1a82b08d085d">connectRobot</a>())</div><div class="line">  {</div><div class="line">    <a class="code" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a name="a12"></a><a class="code" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a012daf6573594f91242f8dd7c02eb74b">ArLog::Terse</a>, <span class="stringliteral">&quot;imuExample: Could not connect to the robot.&quot;</span>);</div><div class="line">    <span class="keywordflow">if</span>(parser.<a name="a13"></a><a class="code" href="classArArgumentParser.html#ac3889cbdfa862031c51bf80e06954914">checkHelpAndWarnUnparsed</a>())</div><div class="line">    {</div><div class="line">        <span class="comment">// -help not given</span></div><div class="line">        <a name="a14"></a><a class="code" href="classAria.html#a10d71f3d4d0cf7f38c58a1f749f64a42">Aria::logOptions</a>();</div><div class="line">        <a name="a15"></a><a class="code" href="classAria.html#a6abc3d39b3e9548063bb8e78375acc17">Aria::exit</a>(1);</div><div class="line">    }</div><div class="line">  }</div><div class="line"></div><div class="line">  <span class="keywordflow">if</span> (!<a name="a16"></a><a class="code" href="classAria.html#a1b090c01d88bb420b8cf8e0384d25ee1">Aria::parseArgs</a>() || !parser.<a class="code" href="classArArgumentParser.html#ac3889cbdfa862031c51bf80e06954914">checkHelpAndWarnUnparsed</a>())</div><div class="line">  {</div><div class="line">    <a class="code" href="classAria.html#a10d71f3d4d0cf7f38c58a1f749f64a42">Aria::logOptions</a>();</div><div class="line">    <a class="code" href="classAria.html#a6abc3d39b3e9548063bb8e78375acc17">Aria::exit</a>(1);</div><div class="line">  }</div><div class="line"></div><div class="line">  <a class="code" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="code" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;imuExample: Connected to robot.&quot;</span>);</div><div class="line"></div><div class="line">  <a name="_a17"></a><a class="code" href="classArKeyHandler.html">ArKeyHandler</a> keyHandler;</div><div class="line">  <a name="a18"></a><a class="code" href="classAria.html#a9e5496a4ec2c379c8e18706922b57cc1">Aria::setKeyHandler</a>(&amp;keyHandler);</div><div class="line">  robot.<a name="a19"></a><a class="code" href="classArRobot.html#ab4ea516667d2358f35b435d97b616ab1">attachKeyHandler</a>(&amp;keyHandler);</div><div class="line">  </div><div class="line">  <span class="comment">// Add imuPacketHandler() as packet handler function </span></div><div class="line">  <a name="_a20"></a><a class="code" href="classArGlobalRetFunctor1.html">ArGlobalRetFunctor1&lt;bool, ArRobotPacket *&gt;</a> myImuPacketHandler(&amp;imuPacketHandler);</div><div class="line">  robot.<a name="a21"></a><a class="code" href="classArRobot.html#a9710774cf8be7f146ca58f83dd076e3f">addPacketHandler</a>(&amp;myImuPacketHandler, <a name="a22"></a><a class="code" href="classArListPos.html#adb42d52c70a646c5698c5513cd25bbd0a7573a55fbcdb54b1768e9ce574407d15">ArListPos::FIRST</a>);</div><div class="line"></div><div class="line">  <span class="comment">// Run robot cycle in background thread</span></div><div class="line">  robot.<a name="a23"></a><a class="code" href="classArRobot.html#a3c3d878cfd11a2ef91230005a83bfcaa">runAsync</a>(<span class="keyword">true</span>);</div><div class="line">  <a name="a24"></a><a class="code" href="group__easy.html#ga4dfb878a3f9123b8dd96ae05b2fd94cb">ArUtil::sleep</a>(500);</div><div class="line"></div><div class="line">  <span class="comment">// Check whether robot firmware thinks it has an IMU</span></div><div class="line">  robot.<a name="a25"></a><a class="code" href="classArRobot.html#a5aecc7ac998c9a31b82fdb904efa8609">lock</a>();</div><div class="line">  <span class="comment">/*</span></div><div class="line"><span class="comment">  if (!robot.getOrigRobotConfig()-&gt;getHasGyro())</span></div><div class="line"><span class="comment">  {</span></div><div class="line"><span class="comment">    ArLog::log(ArLog::Terse, &quot;imuExample: Robot firmware indicates gyro/imu disabled! (See HasGyro and/or GyroType parameter)&quot;);</span></div><div class="line"><span class="comment">    robot.unlock();</span></div><div class="line"><span class="comment">    Aria::exit(1);</span></div><div class="line"><span class="comment">    return 1;</span></div><div class="line"><span class="comment">  }</span></div><div class="line"><span class="comment">  */</span></div><div class="line">  <span class="keywordtype">int</span> gyroType = robot.<a name="a26"></a><a class="code" href="classArRobot.html#abd59593d76f616951dc77110e55802f5">getOrigRobotConfig</a>()-&gt;<a name="a27"></a><a class="code" href="classArRobotConfigPacketReader.html#a653af1e768e4944c5181857e4ce0bded">getGyroType</a>();</div><div class="line">  <span class="keyword">const</span> <span class="keywordtype">char</span> *gyroTypeDescr = <span class="stringliteral">&quot;UNRECOGNIZED VALUE&quot;</span>;</div><div class="line">  <span class="keywordflow">switch</span>(gyroType)</div><div class="line">  {</div><div class="line">    <span class="keywordflow">case</span> 0:</div><div class="line">      gyroTypeDescr = <span class="stringliteral">&quot;Disabled/No Gyro&quot;</span>;</div><div class="line">      <span class="keywordflow">break</span>;</div><div class="line">    <span class="keywordflow">case</span> 1:</div><div class="line">      gyroTypeDescr = <span class="stringliteral">&quot;Pioneer3 Gyro Data&quot;</span>;</div><div class="line">      <span class="keywordflow">break</span>;</div><div class="line">    <span class="keywordflow">case</span> 2:</div><div class="line">      gyroTypeDescr = <span class="stringliteral">&quot;Pioneer3 Gyro Auto&quot;</span>;</div><div class="line">      <span class="keywordflow">break</span>;</div><div class="line">    <span class="keywordflow">case</span> 3:</div><div class="line">      gyroTypeDescr = <span class="stringliteral">&quot;Seekur/SeekurJr Single Axis Gyro&quot;</span>;</div><div class="line">      <span class="keywordflow">break</span>;</div><div class="line">    <span class="keywordflow">case</span> 4:</div><div class="line">      gyroTypeDescr = <span class="stringliteral">&quot;Seekur/SeekurJr IMU&quot;</span>;</div><div class="line">      <span class="keywordflow">break</span>;</div><div class="line">    <span class="keywordflow">default</span>:</div><div class="line">      <a class="code" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="code" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;imuExample: Unrecognized GyroType value %d!&quot;</span>, gyroType);</div><div class="line">  }</div><div class="line">  <a class="code" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="code" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;imuExample: Robot firmware reports GyroType=%d (%s)&quot;</span>);</div><div class="line">  <span class="keywordflow">if</span>(gyroType != 4)</div><div class="line">  {</div><div class="line">    <a class="code" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="code" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a012daf6573594f91242f8dd7c02eb74b">ArLog::Terse</a>, <span class="stringliteral">&quot;imuExample: Robot firmware configuration paramater GyroType=%d (%s). Cannot get IMU data with this GyroType, need GyroType 4.&quot;</span>, gyroType, gyroTypeDescr);</div><div class="line">    robot.<a name="a28"></a><a class="code" href="classArRobot.html#a403d9de010dc2b8d478cd0b14b2d9491">unlock</a>();</div><div class="line">    <a class="code" href="classAria.html#a6abc3d39b3e9548063bb8e78375acc17">Aria::exit</a>(1);</div><div class="line">    <span class="keywordflow">return</span> 1;</div><div class="line">  }</div><div class="line">  robot.<a class="code" href="classArRobot.html#a403d9de010dc2b8d478cd0b14b2d9491">unlock</a>();</div><div class="line"></div><div class="line">  <span class="comment">// request IMU packets continuously</span></div><div class="line">  robot.<a class="code" href="classArRobot.html#a5aecc7ac998c9a31b82fdb904efa8609">lock</a>();</div><div class="line">  robot.<a name="a29"></a><a class="code" href="classArRobot.html#aceef80a6274fb34aafcc422e4b1778c1">comInt</a>(26, 2);  </div><div class="line">  <a class="code" href="classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="code" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;imuExample: Requested IMU packets, waiting...&quot;</span>);</div><div class="line">  robot.<a class="code" href="classArRobot.html#a403d9de010dc2b8d478cd0b14b2d9491">unlock</a>();</div><div class="line"></div><div class="line">  <span class="comment">// Wait for disconnect and exit</span></div><div class="line">  robot.<a name="a30"></a><a class="code" href="group__easy.html#ga95201be7c39b521983b51e6f5d9303e4">waitForRunExit</a>();</div><div class="line">  <a class="code" href="classAria.html#a6abc3d39b3e9548063bb8e78375acc17">Aria::exit</a>(0);</div><div class="line">}</div><div class="line">             </div></div><!-- fragment --> </div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
